import {Box, Button, Paper, Dialog, DialogTitle, DialogContent,DialogContentText, DialogActions } from '@mui/material';
import { useState } from 'react';
import fetchData from '../../utils/ApiFetch';
import downloadFiles from '../../utils/FileDownload';
import FolderTree from '../FolderTree/FolderTree';
import CloudDownloadIcon from '@mui/icons-material/CloudDownload';

const apiUrl = process.env.REACT_APP_API_URL;



function FileToolsBar(props) {
    let selectedFiles = props.selectedFiles;
    let toolbar = props.toolbar;
    return (
        <Box className='file-panel-actionbar'>
            <Paper sx={{paddingLeft:'12px',paddingTop:'5px',paddingBottom:'5px'}}>
                { toolbar.map(tool => <Button key={tool.name} disabled={selectedFiles.length === 0} {...tool.params} >{tool.name}</Button>) }
            </Paper>
        </Box>
    );
}

export default FileToolsBar;